home *** CD-ROM | disk | FTP | other *** search
/ BUG 1 / BUGCD1996_0708.ISO / pc / util / minilin / minilin.exe / VAR / ADM / SETUP / SETUP_GP.{_7 < prev    next >
Text File  |  1994-06-03  |  5KB  |  178 lines

  1. #!/bin/sh
  2. if [ -r /tmp/SeTcolor -o "$COLOR" = "on" ]; then # we can use color...
  3.  
  4.  dialog --title "SET YOUR MODEM SPEED" --menu "Please select a modem speed. \
  5. You may use setserial later to make 38400 stand for a higher baud rate if \
  6. these speeds aren't fast enough." \
  7. 16 60 7 \
  8. "38400" "" \
  9. "19200" "" \
  10. "9600" "" \
  11. "4800" "" \
  12. "2400" "" \
  13. "1200" "" \
  14. "300" "Ouch!" \
  15. 2> /tmp/SeTreturn
  16.  if [ $? = 1 -o $? = 255 ]; then
  17.   rm -f /tmp/SeTreturn
  18.   exit
  19.  fi
  20.  BAUD="`cat /tmp/SeTreturn`"
  21. else
  22.  while [ 0 ]; do
  23.   echo "SELECT DEFAULT MODEM SPEED"
  24.   echo
  25.   echo "Valid speeds are: 38400, 19200, 9600, 4800, 2400, 1200, 300"
  26.   echo 
  27.   echo "Please enter a modem speed. You may use setserial later to make "
  28.   echo "38400 stand for a higher baud rate if these speeds aren't fast "
  29.   echo "enough."
  30.   echo
  31.   echo -n "Enter speed ==> "
  32.   read BAUD
  33.   if [  "$BAUD" = "38400" -o "$BAUD" = "19200" -o "$BAUD" = "9600" \
  34. -o "$BAUD" = "4800" -o "$BAUD" = "2400" -o "$BAUD" = "1200" \
  35. -o "300" ]; then
  36.    break;
  37.   fi
  38.   echo 
  39.   echo "Invalid choice. Try again."
  40.   echo
  41.  done
  42. fi
  43. mkdir -p var/lib/minicom
  44. cat << EOF > var/lib/minicom/minirc.dfl
  45. pr port             /dev/modem
  46. pu baudrate         $BAUD
  47. pu bits             8
  48. pu parity           N
  49. pu mdialpre         ATDT
  50. pu updir            .
  51. pu downdir          .
  52. pu scriptdir        /var/lib/minicom
  53. pu backspace        DEL
  54. EOF
  55. chmod 644 var/lib/minicom/minirc.dfl
  56. mkdir -p etc/skel
  57. cat << EOF > etc/skel/.kermrc
  58. set line /dev/modem
  59. set speed $BAUD
  60. set modem hayes
  61. set file type bin
  62. set file name lit
  63. set rec pack 1000
  64. set send pack 1000
  65. set window 5
  66. set prompt Linux Kermit> 
  67. EOF
  68. cat << EOF > etc/skel/.term/termrc
  69. #From johnsonm@stolaf.edu Sun Dec 13 05:07:38 1992
  70. #The format of the ~/.term/termrc file.
  71. #All blank lines, and line begining with a '#' are ignored.
  72. #All command words must be in lowercase.
  73. #valid lines are... 
  74.  
  75. compress off
  76. # To turn of compression. Useful for compressing modems
  77. # No benchmarks have been done to see which does better compression,
  78. # modems, or term. See OPTIONS to compression compression on/off on
  79. # a per client basis.
  80.  
  81. #escape 158
  82. # tells term never to transmit character with decimal number
  83. # 158. Use the ouput of checkline to find out what to put
  84. # here. Valid number are anything between 32 and 255
  85. # Use one line for each character.
  86. # ranges are valid. I.e. "escape 128-159"
  87.  
  88. escape 0-31
  89. escape 128-159
  90. # the above are some handy escapes that will cause most lines to work.
  91. # but they are very inefficent (they escape 25% of all bytes sent!!!)
  92. # so try and escape as few as possible.
  93.  
  94.  
  95. baudrate $BAUD
  96. # Sets the baudrate. Actually used to limit the maximum
  97. # number of characters sent per second.
  98. # valid numbers are anything >= 2400. Default is zero.
  99.  
  100. #shift 224
  101. # Sets a 'shift' value. This number is XOR'ed with
  102. # all bytes before they are sent.  This is in a bid to
  103. # reduce the number of escaped characters sent. Histograms
  104. # show that 224-255 has the least number of characters sent
  105. # and 0-31 has the most. This should improve things. The
  106. # default is zero for backward compatability.
  107.  
  108. #flowcontrol 500
  109. # Tell term to generate control-Q's everynow and then
  110. # used in case your terminal server understands flow control
  111. # and things will accidently turn it off. i.e. line noise
  112. # sends a control-S.
  113.  
  114. window 3
  115. # Set the maximum number of packets that can be outstanding
  116. # useful values are around 2-6.
  117.  
  118. timeout 100
  119. # sets the length of time to wait before retransmitting a 
  120. # packet. If useing a large window size, then increase this
  121. # value. A smaller window sizes merits a smaller timeout 
  122. # value. If getting too many re-transmits, then increase.
  123. # measured in 1/20th's of a second. 
  124.  
  125. #force on
  126. # Turn transmit forceing on.
  127.  
  128. noise on
  129. # Turn on printing out line noise.
  130.  
  131. #sevenbit
  132. # If were are running on a 7 bit line..
  133.  
  134. #seven_in
  135. # If your incoming line is seven bit.
  136. # Note that these are symetric. If you have seven_in on one end, you MUST
  137. # have seven_out on the other.
  138.  
  139. #seven_out
  140. # If your outgoing line is seven bit. "seven_in" and "seven_out" together
  141. # are the same as "sevenbit".
  142.  
  143.  
  144. ignore 17
  145. # Silently strip the character 17 from the input stream.
  146.  
  147. ignore 19
  148. # ditto.
  149.  
  150. # breakout 24
  151. # set the breakout character to be control-X. So five control-X's types
  152. # to term will cause it to exit.
  153.  
  154. # chdir /usr/users/oreillym
  155. # Make the default directory usr/users/oreillym (my home dir).
  156. EOF
  157. chmod 755 etc/skel/.term/termrc
  158. for DIR in root home/gonzo home/pit home/hell ; do
  159.  if [ -d $DIR ]; then
  160.   if [ ! -d $DIR/.term ]; then
  161.    mkdir $DIR/.term
  162.   fi
  163.   cp etc/skel/.kermrc $DIR/.kermrc
  164.   cp etc/skel/.less $DIR/.less
  165.   cp etc/skel/.term/termrc $DIR/.term/termrc 
  166.  fi
  167. done
  168. if [ -d home/gonzo ]; then
  169.  chown --recursive gonzo.users home/gonzo 2> /dev/null
  170. fi
  171. if [ -d home/pit ]; then
  172.  chown --recursive snake.users home/pit 2> /dev/null
  173. fi
  174. if [ -d home/hell ]; then
  175.  chown --recursive satan.users home/hell 2> /dev/null
  176. fi
  177.